package com.han.prototype.demo2;

/**
 * @ClassName CitationTest
 * @Description 描述该类的功能
 * @Author duoduo Han
 * @Date 2024/6/4 21:09
 */
public class CitationTest {
    public static void main(String[] args) throws CloneNotSupportedException {
        Citation citation = new Citation();
        Student student = new Student();
        student.setName("孙佳玲");
        citation.setStu(student);

        Citation citation1 = citation.clone();
        citation1.getStu().setName("李四");

        Student stu = citation.getStu();
        Student stu1 = citation1.getStu();

        System.out.println("stu与stu1是同一个对象？" + (stu == stu1));

        citation.show();
        citation1.show();

    }
}
